
public class Threadthis {

    public static void main(String[] args) throws Exception{
        System.out.println("================= Threadthis ===============");
        
        Thread t = new Addcount();
        t.start();
        t.join();

        System.out.println(Addcount.cout);
    }
}



class Addcount extends Thread {
    public static int cout = 0 ;

    public synchronized void run(){
        for(int i=0; i<=10000;i++){
            cout +=1 ;
        }
    }
}





